﻿using FDEEPublicFunc;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FDEEMain
{
    public partial class SelectBarrierPositionFileForm : Form
    {
        public string fileName = "";      
        public string title = "";
        public string pierParas = "";
        public SelectBarrierPositionFileForm()
        {
            InitializeComponent();
          
        }
      

        private void btnConfim_Click(object sender, EventArgs e)
        {
            title = cbLine.Text;
            pierParas = pierPara.Text;
            if (string.IsNullOrWhiteSpace(fileName))
            {
                MessageBox.Show("请选择文件！", "提示");
                return;
            }
            this.DialogResult = DialogResult.OK;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private void btnSelect_Click(object sender, EventArgs e)
        {
            //打开文件
            OpenFileDialog dlg = new OpenFileDialog();
            dlg.DefaultExt = "xlsx";
            dlg.Filter = "xlsx or csv Files|*.xlsx;*.csv";
            if (dlg.ShowDialog() == DialogResult.OK)
                fileName = dlg.FileName;
            if (fileName == null)
                return;
            tkPath.Text = fileName;

        }

    }
}
